const gulp = require('gulp');
const kitty = require('vkitty');
const serve = require('kitty-serve');

var loaders = kitty.loaders;

loaders.beforeCompile =  function(content){
    content = content.replace(/@rem/g,'75rem');
    content = content.replace(/localhost/g,'192.168.10.143');
    return content;
};

gulp.task('start',function(){
    kitty.watch('./src/pages/*/index.html')
        .pipe(serve.src({
            port:8082,
            prePath:"/shenbi"
        }))
        .pipe(serve.cdn({
            port:8083
        }))
});

